package com.kalvan.admin.remoteserver;

import com.kalvan.remoteserver.iface.IDictCacheUpdate;
import com.kalvan.web.dict.DictCache;
import lombok.extern.slf4j.Slf4j;
import org.apache.dubbo.config.annotation.Service;
import org.springframework.beans.factory.annotation.Autowired;


/**
 * 更新缓存服务
 *
 * @author chenliang
 */
@Slf4j
@Service(timeout = 10000)
public class UpdateCacheServer implements IDictCacheUpdate {

    @Autowired
    DictCache dictCache;

    @Override
    public Boolean clearDictCache(String dictType) {
        log.info("清理数据字段缓存{}", dictType);
        dictCache.updateDictCache(dictType);
        return true;
    }
}
